Flatness Checking